from drg_group.yinchuan_2023.Base import message,intersect,SS_VALID
from drg_group.yinchuan_2023.DRG import MDCI_DRG

def group(record):
  adrg_zd=["S52.100x001","S52.101","S52.201","S52.310","S52.400x001","S52.500x001","S52.500x002","S52.500x011","S52.500x021","S52.501","S52.600x001","S52.600x002","S52.711","S52.801","S52.802","S52.900","S53.002","S53.402","S56.000x002","S56.100x002","S56.100x003","S56.200x002","S56.400x001","S56.400x002","S56.500x002","S56.801","S59.700","S61.901","S61.902","S62.100x011","S62.100x041","S62.100x091","S62.300x031","S62.301","S62.410","S62.600x002","S62.600x021","S62.600x031","S62.802","S63.000x081","S63.400x004","S63.500x002","S66.000x003","S66.000x007","S66.100x001","S66.100x003","S66.100x004","S66.100x007","S66.100x008","S66.200x001","S66.200x004","S66.200x008","S66.300x007","S66.500x003","S66.600x001","S66.800","S66.900x003","S69.700","S91.303","S92.000","S92.200x001","S92.300","S92.300x001","S92.300x003","S92.500x001","S92.700","S92.910","S93.101","S93.102","S93.300x081","S93.301","S93.600x004","S93.601","S99.800x001"]
  adrg_zd1=[]
  adrg_ss=[]
  adrg_ss1=[]
  adrg_ss2=[]
  dept_list=[]
  if True and record.zdList[0] in adrg_zd:
    message('符合IS1入组条件，匹配规则：主诊断匹配')
    
    if MDCI_DRG.IS19_group(record):
      return 'IS19'

    return 'IS1'
  else:
    return ''

